package com.cbh.feign.controller.institution;



import java.util.List;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.cbh.api.model.ApiResult;
import com.cbh.api.model.institution.Organize;
import com.cbh.api.model.institution.TreeBase;

public interface OrganizeControllerBase {

	/**
	 * 组织信息保存
	 * 
	 * @param accountToken
	 * @param ob
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/organize", method = RequestMethod.POST)
	public ApiResult<String> save( @RequestParam(value = "accountToken", required = true) String accountToken,
			 @RequestBody(required = true) Organize ob) ;

	/**
	 * 根据ID获取组织信息
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/organize/id", method = RequestMethod.GET)
	public ApiResult<Organize> getByIcId( 
			@RequestParam(value = "accountToken", required = true) String accountToken,
			 @RequestParam(value = "id", required = true) String id) ;

	/**
	 * 根据机构ID获取组织信息
	 * 
	 * @param accountToken
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/organize/institution/id", method = RequestMethod.GET)
	public ApiResult<List<Organize>> institution(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "id", required = true) String id) ;

	/**
	 * 获取机构树信息
	 * 
	 * @param accountToken
	 * @param corporate
	 * @param organize
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/organize/tree", method = RequestMethod.GET)
	public ApiResult<List<TreeBase>> queryBaseTree(
			@RequestParam(value = "accountToken", required = true) String accountToken,
			@RequestParam(value = "corporate", required = false) String corporate,
			@RequestParam(value = "organize", required = false) String organize) ;

	@RequestMapping(value = "/auth/v3/organize/treeAll", method = RequestMethod.GET)
	public ApiResult<List<TreeBase>> queryBaseTreeAll(
			@RequestParam(value = "accountToken", required = true) String accountToken) ;

	/**
	 * 获取机构树信息
	 * 
	 * @param accountToken
	 * @param corporate
	 * @param organize
	 * @return
	 */
	@RequestMapping(value = "/auth/v3/organize/tree/self", method = RequestMethod.GET)
	public ApiResult<List<TreeBase>> queryBaseTreeByAccountToken(
			@RequestParam(value = "accountToken", required = true) String accountToken) ;

}
